#![allow(unused)]

use anyhow::Result;
use serde_json::json;

#[tokio::test]
async fn quick_dev() -> Result<()> {
    let hc = httpc_test::new_client("http://localhost:5852")?;

    //hc.do_get("/hello").await?.print().await?;

    // let req_login = hc.do_post(
    //     "/api/login",
    //     json!({
    //         "username": "jerry",
    //         "password": "5852"
    //     }),
    // );
    // req_login.await?.print().await?;
    // hc.do_get("/helloparam?name=Jerry").await?.print().await?;

    // let req_create_tickets = hc.do_post("/api/tickets",
    //     json!({
    //         "title": "Test Ticket",
    //         "description": "This is a test ticket",
    //     }),
    // );
    // req_create_tickets.await?.print().await?;
    hc.do_delete("/api/tickets/1").await?.print().await?;

    hc.do_get("/api/tickets").await?.print().await?;
    Ok(())
}
